using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Polymorphous:Weapon {

	public Polymorphous(WeaponData weaponData) : base(weaponData) { }

	protected override void ProjectileFiringEventHandler(object _sender,ProjectileEventArgs e) {
		base.ProjectileFiringEventHandler(_sender,e);
		if(!IfReactFireEvent(_sender,e)) return;
		e.stat.inaccuracy.AddMultiply(0.2f/Mathf.Max(currentBurst.chargeAmount,0.2f),0);
		e.stat.speed.AddMultiply(1+currentBurst.chargeAmount,0);
		e.stat.damage.AddMultiply(1+currentBurst.chargeAmount,0);
	}

	protected override void DoRecoil(ShotStats stat) {
		base.DoRecoil(stat);
		Debug.Log(currentBurst.chargeAmount);
		if(currentBurst.chargeAmount>0.9f)
			slot.SetAttackIndex(1);
	}

}
